package ${modulePackage};

import ApiResult;
import BaseController;
import io.swagger.annotations.*;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
* @author${author}
* @date ${date}.
*/
@RestController
@RequestMapping("${baseRequestMapping}")
@Api(description = "描述相关接口")
public class ${modelNameUpperCamel}Controller extends BaseController {
     @Resource
     private ${modelNameUpperCamel}Service ${modelNameLowerCamel}Service;

    @PostMapping
    public ApiResult add(@RequestBody ${modelNameUpperCamel}DO ${modelNameLowerCamel}DO) {
             return success();
    }

    @DeleteMapping("/{id}")
    public ApiResult delete(@PathVariable Integer id) {
             return success();
    }

    @PutMapping
    public ApiResult update(@RequestBody ${modelNameUpperCamel}DO ${modelNameLowerCamel}DO) {
             return success();
    }

    @GetMapping("/{id}")
    public ApiResult detail(@PathVariable Integer id) {
             return success();
    }

    @GetMapping
    public ApiResult list(@RequestParam(defaultValue = "0") Integer page, @RequestParam(defaultValue = "0") Integer size) {
             PageHelper.startPage(page, size);
             PageInfo pageInfo = new PageInfo();
             return success(pageInfo);
    }
}
